@extends('layouts.template')

@section('title', '个人中心')

@section('header')
@endsection

@section('content')
    <script src="{{asset('dist/master/changeServiceType.js')}}"></script>
    <script>
        var service_type = {!! json_encode($user->service_type) !!};
        var delivery = {!! json_encode($delivery) !!};
        var carry = {!! json_encode($carry) !!};
        var install = {!! json_encode($install) !!};
        var repair = {!! json_encode($repair) !!};
    </script>
    <div class="ziliao">
        <form action="" method="post" id="form">
            {{csrf_field()}}
            <div class="ziliao_b mar03"><p>
                    温馨提醒：请选择具体的服务类型，平台系统将根据您所选择的服务类型进行推送!</p>
            </div>

            <div class="ziliao_c overflow_h">
                <h2><label><span>
                        <input type="checkbox" name="service_type[]" id="checkbox_1" value="1" @click="checkPartAll">
                        </span><i>配送</i></label></h2>
                <ul class="ziliao_c_1">
                    <li v-cloak v-for="(value, key, index) in delivery" :class="{mar04:(index+1)%3}">
                        <label class="zc01">
                            <input v-show="false" type="checkbox" name="service_type[]" :id="'checkbox_'+key" :value="key" @click="check">@{{value}}
                        </label></li>
                </ul>
            </div>

            <div class="ziliao_c overflow_h">
                <h2><label><span>
                        <input type="checkbox" name="service_type[]" id="checkbox_4" value="4" @click="checkPartAll">
                        </span><i>搬运 </i></label></h2>
                <ul class="ziliao_c_1">
                    <li v-cloak v-for="(value, key, index) in carry" :class="{mar04:(index+1)%3}">
                        <label class="zc01">
                            <input v-show="false" type="checkbox" name="service_type[]" :id="'checkbox_'+key" :value="key" @click="check">@{{value}}
                        </label></li>
                </ul>
            </div>

            <div class="ziliao_c overflow_h">
                <h2><label><span>
                        <input type="checkbox" name="service_type[]" id="checkbox_2" value="2" @click="checkPartAll">
                        </span><i>安装 </i></label></h2>
                <ul class="ziliao_c_1">
                    <li v-cloak v-for="(value, key, index) in install" :class="{mar04:(index+1)%3}">
                        <label class="zc01">
                            <input v-show="false" type="checkbox" name="service_type[]" :id="'checkbox_'+key" :value="key" @click="check">@{{value}}
                        </label></li>
                </ul>
            </div>

            <div class="ziliao_c overflow_h">
                <h2><label><span>
                        <input type="checkbox" name="service_type[]" id="checkbox_3" value="3" @click="checkPartAll">
                        </span><i>维修</i></label></h2>
                <ul class="ziliao_c_1">
                    <li v-cloak v-for="(value, key, index) in repair" :class="{mar04:(index+1)%3}">
                        <label class="zc01">
                            <input v-show="false" type="checkbox" name="service_type[]" :id="'checkbox_'+key" :value="key" @click="check">@{{value}}
                        </label></li>
                </ul>
            </div>
            <button class="but07" type="submit">保存</button>
        </form>
    </div>
@endsection